package com.xcc.common.code;

/**
 * @name: frosty
 * @description :
 * @date: 2019/11/8
 */
public enum ErrorCode {
    SUCCESS(200,"success"),
    ERROR(100,"faild");
    private int code;
    private String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
    ErrorCode() {

    }
    public  static  String getMessage(ErrorCode errorCode){
        return  errorCode.getMessage();
    }
    public  static  int getCode(ErrorCode errorCode){
        return  errorCode.getCode();
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }}
